package com.totem.admin.controller;

import com.totem.admin.api.TestServiceApi;
import com.totem.admin.schedule.FundDailyEndTask;
import com.totem.admin.schedule.SubscribeAwardTask;
import com.totem.admin.schedule.SubscribeDailyTask;
import com.totem.base.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class TestController implements TestServiceApi {
    @Autowired
    private FundDailyEndTask fundDailyEndTask;
    @Autowired
    private SubscribeAwardTask subscribeAwardTask;
    @Autowired
    private SubscribeDailyTask subscribeDailyTask;

    @Override
    public Result<Boolean> testFundDayend() {
        fundDailyEndTask.dayendReturn();
        return Result.success();
    }

    @Override
    public Result<Boolean> testSubscribeDayend() {
        subscribeDailyTask.dayendReturn();
        return Result.success();
    }
}
